package com.data.dto;

import java.io.Serializable;

public class User  implements Serializable, Comparable<User>{
    private int id;
    private String loginName;
    private String code;
    private String token;

    public User(int id, String loginName, String code, String token) {
        this.id= id;
        this.loginName = loginName;
        this.code = code;
        this.token = token;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public int compareTo(User info) {
        return Integer.valueOf(this.id).compareTo(Integer.valueOf(info.id));
    }

}
